import nprogress from 'nprogress'
// import 'nprogress/nprogress.css'
import './nprogress.scss'

// nprogress.configure({ easing: 'cubic-bezier', speed: 200 })

nprogress.configure({ parent: '#app' })
// nprogress.configure({ trickle: false });
// nprogress.configure({ trickleSpeed: 50 });
$('#btn-loading').on('click', function () {
    nprogress.start()
    var i = 0;
    var timer = setInterval(() => {
        if(nprogress.status){
            $('#inc_counter').text(i++)
            $('#status_counter').text(nprogress.status)
            nprogress.inc()
        }else{
            clearInterval(timer)
        }
    }, 500);
    setTimeout(() => {
        nprogress.done()
    }, 3000);
})